import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
let defaultCity ="天津"
try{
  if(localStorage.city){
    defaultCity=localStorage.city
  }
}catch (e) {

}
export  default new Vuex.Store({
  state:{
    city:localStorage.city||"天津"
  },
  mutations:{
    changCtiy(state,item){
      state.city=item
      try{
        localStorage.city=item
      }catch (e) {

      }

    }
  }
})
